package com.example.a10;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@Slf4j
public class Aspectj01Application {

	public static void main(String[] args) {
		ConfigurableApplicationContext context = SpringApplication.run(Aspectj01Application.class, args);
		MyService service = context.getBean(MyService.class);

		log.info("service class:{}", service.getClass());
		service.foo();
		context.close();
//		new MyService().foo();
	}

}
